package SetCompany;

import Test11_08.Company;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Company company = new Company();
        company.toString();
        Scanner input = new Scanner(System.in);
        while (true) {

            System.out.println("请选择");
            System.out.println("1.查看员工   2.添加员工   3.查询公司人数  4.辞退员工  5.查找工资最高的员工  6.涨薪  0.退出.");
            int choise = input.nextInt();
            if (choise == 2) {
                //String name, String age, String sex, String work, int money, String id
                System.out.println("请输入员工姓名：");
                String name = input.next();
                System.out.println("请输入员工年龄：");
                int age  = input.nextInt();
                System.out.println("请输入员工性别：");
                String sex = input.next();
                System.out.println("请输入员工职务：");
                String work = input.next();
                System.out.println("请输入员工工资：");
                int money = input.nextInt();
                System.out.println("请输入员工工号：");
                String id = input.next();
                company.addPeo(name,age,sex,work,money,id);
            }
            if (choise == 1) {
                company.show();
            }
            if (choise == 3) {
                company.comPosShow();
            }
            if (choise == 4) {
                System.out.println("请输入想删除的员工的id");
                String num = input.next();
                company.fired(num);
            }
            if (choise == 5) {
                company.maxSee();
            }
            if (choise == 6) {

            }
            if (choise == 0) {
                break;
            }
        }
    }
}
